<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html;" charset="<?php echo CHARSET;?>">
<title>本地生活</title>
<link href="/Public/admin/css/skin_0.css" rel="stylesheet" type="text/css" id="cssfile"/>
<script type="text/javascript" src="/Public/static/jquery.js"></script>
<script type="text/javascript" src="/Public/static/jquery.validation.min.js"></script>
<script type="text/javascript" src="/Public/admin/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/Public/admin/js/admincp.js"></script>
<script type="text/javascript" src="/Public/admin/js/jquery.tooltip.js"></script>
<script language="javascript">
var SiteUrl = '<?php echo (C("SiteUrl")); ?>';
var AdminUrl = SiteUrl+'/<?php echo (MODULE_NAME); ?>';
</script>
</head><body>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>商品分类</h3>
      <ul class="tab-base">
        <li><a href="JavaScript:void(0);" class="current"><span>管理</span></a></li>
        <li><a href="<?php echo U('Goods/goods_class_add');?>" ><span>新增</span></a></li>
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  <form method='post'>
    <input type="hidden" name="form_submit" value="ok" />
    <input type="hidden" name="submit_type" id="submit_type" value="" />
     <table class="table tb-type2">
          <thead>
            <tr class="thead">
              <th></th>
              <th>排序</th>
              <th>分类名称</th>
              <th></th>
              <th class="align-center"></th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
            <?php if(!empty($class_list)): if(is_array($class_list)): $i = 0; $__LIST__ = $class_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><tr class="hover edit">
              <td class="w48"><input type="checkbox" name="check_gc_id[]" value="<?php echo ($v['gc_id']); ?>" class="checkitem">
                <?php if($v["have_child"] == 1): ?><img fieldid="<?php echo ($v['gc_id']); ?>" status="open" nc_type="flex" src="/Public/admin/images/tv-expandable.gif">
                <?php else: ?>
                <img fieldid="<?php echo ($v['gc_id']); ?>" status="close" nc_type="flex" src="/Public/admin/images/tv-item.gif"><?php endif; ?>
              </td>
              <td class="w48 sort"><span title="可编辑" ajax_branch="gc_sort" datatype="number" fieldid="<?php echo ($v['gc_id']); ?>" ajax_control="Goods" fieldname="gc_sort" nc_type="inline_edit" class="editable tooltip"><?php echo ($v['gc_sort']); ?></span></td>
              <td class="w50pre name">
              <span title="可编辑" required="1" fieldid="<?php echo ($v['gc_id']); ?>" ajax_branch="gc_name" ajax_control="Goods" fieldname="gc_name" nc_type="inline_edit" class="editable tooltip"><?php echo ($v['gc_name']); ?></span>
              <a class="btn-add-nofloat marginleft" href="<?php echo U('Goods/goods_class_add',array('gc_parent_id'=>$v['gc_id']));?>"><span>新增下级</span></a>
              </td>
              <td></td>
              <td class="align-center power-onoff"></td>
              <td class="w84"><a href="<?php echo U('Goods/goods_class_edit',array('gc_id'=>$v['gc_id']));?>">编辑</a> | <a href='javascript:if(confirm("您确定要删除？"))window.location ="<?php echo U('Goods/goods_class_del',array('gc_id'=>$v['gc_id']));?>";'>删除</a></td>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
            <?php else: ?> 
            <tr class="no_data">
              <td colspan="10">暂无记录</td>
            </tr><?php endif; ?>
          </tbody>
           <?php if(!empty($class_list)): ?><tfoot>
            <tr class="tfoot">
              <td><!--<input type="checkbox" class="checkall" id="checkall_1">--></td>
              <td id="batchAction" colspan="15">
              <!--<span class="all_checkbox"><label for="checkall_2">选择所有</label></span>&nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn" onclick="if(confirm('您确定要删除？')){$('#submit_type').val('del');$('form:first').submit();}"><span>删除</span></a>-->
             </td>
            </tr>
          </tfoot><?php endif; ?>
        </table>   
  </form>
</div>
<script type="text/javascript" src="/Public/admin/js/jquery.edit.js" charset="utf-8"></script> 
<script type="text/javascript" src="/Public/admin/js/jquery.goods_class.js" charset="utf-8"></script>
</body></html>